/* ----------------------------------------------------------------------------
* File: message_queue_impl.cpp
*
* Desc: Implementation for message queue
*
* Created: 23/05/2011, by Alexey Korshunov
* ---------------------------------------------------------------------------- */
#include "message_input_queue_impl.h"
#include <iostream>


namespace Common
{
	MessageInputQueueImpl::MessageInputQueueImpl()
	{
	}
	
	MessageInputQueueImpl::~MessageInputQueueImpl()
	{
	}

	size_t MessageInputQueueImpl::GetCount() const
	{
		if (std::cin.eof())
			return 0;
		else
			return 1;
	}
	
	void MessageInputQueueImpl::PutMsg(const std::string& msg)
	{
	}
	
	void MessageInputQueueImpl::GetMsg(std::string& msg)
	{
		char str[128];
		std::cin.getline(str, sizeof(str));
		msg.append(str);
	}
	
	void MessageInputQueueImpl::Clear()
	{
		std::cin.clear();
	}
}